import request from '@/utils/request'

// 登录方法
export function upload(data) {
  return request({
    url: '/pubmk/upload/upload_file',
    headers: {
      isFile: true,
      repeatSubmit: false
    },
    method: 'post',
    data: data
  })
}

export function get_qiniu(data) {
  return request({
    url: '/pubmk/upload/get_qiniutoken',
    headers: {
      repeatSubmit: false
    },
    method: 'post',
    data: data
  })
}

export function get_aliyun(data) {
  return request({
    url: '/pubmk/upload/get_aliyuntoken',
    headers: {
      repeatSubmit: false
    },
    method: 'post',
    data: data
  })
}

export function upload_aliyun(url,data) {
  return request({
    url: url,
    headers: {
      isFile: true,
      repeatSubmit: false
    },
    method: 'post',
    data: data
  })
}
